<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>6.回顾css动画</title>
    <style>
      h1 {
        background-color: orange;
      }
      @keyframes dongqilai {
        from{
          transform: translateX(0);
        }
        to{
          transform: translateX(-100%);
        }
      }
      .likai {
        animation: dongqilai linear 1s;
        animation-fill-mode: forwards;
      }
      .jinlai {
        animation: dongqilai linear 1s reverse;
        animation-fill-mode: forwards;
      }
    </style>
  </head>
  <body>
    <h1>你好</h1>
  </body>
</html>